﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace MadPropsDemo.Tests.RecipeEditorTests
{
    [TestClass]
    public class when_the_user_clicks_New : RecipeEditorTestBase
    {
        // TODO should show a "Really discard unsaved changes?" dialog

        [TestMethod]
        public void MyTestMethod()
        {
            // arrange
            RecipeName = "don't care";
            Assert.IsTrue(HasUnsavedChanges);

            // act
            viewModel.Commands.New.Execute(null);

            // there is a new recipe
            Assert.AreEqual("[recipe name]", RecipeName);

            // the unsaved changes flag has been cleared
            Assert.IsFalse(HasUnsavedChanges);
        }
    }
}
